Skip to content

Switch benchmarks to comment-triggered invocation#48

Merged
luccabb merged 2 commits intomasterfrom
comment-triggered-benchmarks
Feb 16, 2026
Merged

Switch benchmarks to comment-triggered invocation#48
luccabb merged 2 commits intomasterfrom
comment-triggered-benchmarks

Conversation

@luccabb
Copy link
Owner

@luccabb luccabb commented Feb 16, 2026

Summary

  • Benchmarks (Stockfish + NPS) no longer run automatically on every PR push
  • Instead, they are triggered by posting /run-stockfish-benchmark or /run-nps-benchmark as a PR comment
  • A new benchmark-help.yml workflow posts instructions automatically when a PR is opened that touches engine code
  • Triggering comments get a rocket reaction as acknowledgment

Test plan

  • Open a PR that touches moonfish/** and verify the help comment is posted
  • Post /run-nps-benchmark on a PR and verify the NPS benchmark runs
  • Post /run-stockfish-benchmark on a PR and verify the Stockfish benchmark runs
  • Verify rocket reaction appears on the triggering comment
  • Verify benchmark results are posted back as PR comments

Benchmarks are expensive and shouldn't run on every PR push. Switch to
comment-triggered invocation via `/run-nps-benchmark` and
`/run-stockfish-benchmark` commands. A help comment is posted
automatically when a PR is opened that touches engine code.
@greptile-apps
Copy link

greptile-apps bot commented Feb 16, 2026

Greptile Summary

Switches both Stockfish and NPS benchmarks from automatic pull_request triggers to on-demand issue_comment triggers (/run-stockfish-benchmark and /run-nps-benchmark). A new benchmark-help.yml workflow posts instructions when a PR touching engine code is opened.

  • Stockfish benchmark (benchmark.yml) now triggers on /run-stockfish-benchmark comment, uses gh pr checkout to check out the PR branch, and reacts with a rocket emoji
  • New NPS benchmark workflow (nps-benchmark.yml) follows the same comment-triggered pattern with /run-nps-benchmark
  • New help workflow (benchmark-help.yml) posts available benchmark commands as a comment when a PR is opened
  • Removed the old eyes → thumbs-up reaction flow in favor of a simpler rocket reaction on the triggering comment

Confidence Score: 4/5

  • This PR is safe to merge — CI workflow changes with no impact on engine code.
  • The changes follow standard GitHub Actions patterns for comment-triggered workflows. The issue_comment trigger, if guards, and gh pr checkout pattern are all correct. Minor consideration: contains() could match partial strings in comments, but this is a known trade-off in comment-triggered workflows and not a functional bug.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/benchmark-help.yml New workflow that posts benchmark trigger instructions as a comment when a PR is opened that touches engine code. Straightforward and correct.
.github/workflows/benchmark.yml Switched from pull_request trigger to issue_comment trigger for comment-based invocation. Adds gh pr checkout step, updates reaction handling, and correctly uses github.event.issue.number for PR references. The job dependency chain correctly gates execution through the react job's if condition.
.github/workflows/nps-benchmark.yml New NPS benchmark workflow triggered by /run-nps-benchmark comment. Correct issue_comment pattern with proper if guard. Runs benchmark and posts results back to the PR.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant PR as Pull Request
    participant GHA as GitHub Actions
    participant Runner as CI Runner

    Dev->>PR: Opens PR (touches engine code)
    PR->>GHA: pull_request [opened]
    GHA->>PR: Posts benchmark help comment

    Dev->>PR: Comments /run-nps-benchmark
    PR->>GHA: issue_comment [created]
    GHA->>PR: Adds rocket reaction
    GHA->>Runner: Checkout PR branch & run NPS bench
    Runner->>PR: Posts NPS results comment

    Dev->>PR: Comments /run-stockfish-benchmark
    PR->>GHA: issue_comment [created]
    GHA->>PR: Adds rocket reaction
    GHA->>Runner: Checkout PR & run Stockfish bench (5 chunks × 3 skill levels)
    Runner->>PR: Posts aggregated Stockfish results comment
Loading

Last reviewed commit: 6add9d9

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@luccabb luccabb merged commit f26f2e9 into master Feb 16, 2026
10 checks passed
@luccabb luccabb deleted the comment-triggered-benchmarks branch February 16, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant